#ifndef PATIENTSELECTDIALOG_H
#define PATIENTSELECTDIALOG_H

#include <QDialog>
#include <QSqlRecord>
class SqlPatientModel;

namespace Ui {
class PatientSelectDialog;
}

class PatientSelectDialog : public QDialog
{
    Q_OBJECT

public:
    explicit PatientSelectDialog(const QString &name, QWidget *parent = 0);
    ~PatientSelectDialog();

    const QSqlRecord &getPatient() const { return record; }

protected slots:
    void onSelect();
    void onItemActivated(const QModelIndex &index);

private:
    Ui::PatientSelectDialog *ui;

    QSqlRecord record;
    SqlPatientModel *pModel;

};

#endif // PATIENTSELECTDIALOG_H
